Subject: DLSw Version 0.13, Chapter 5, State Machines (2 of 3)

From: "Alan K. Bartky, Manager of Technology" <[email-masked]>
Date: Mon, 3 Oct 94 15:34: 8 PDT

----------
X-Sun-Data-Type: text
X-Sun-Data-Description: text
X-Sun-Data-Name: text
X-Sun-Content-Lines: 1
X-Sun-Content-Length: 66

Here is the second part of three of DLSw Version 0.13 Chapter 5.

----------
X-Sun-Data-Type: default
X-Sun-Data-Description: default
X-Sun-Data-Name: d5b.txt
X-Sun-Content-Lines: 497
X-Sun-Content-Length: 27568



RFC XXXX      DLSw: Switch-to-Switch Protocol              August 1994

   transition. If a particular event is not listed for a given state, no
   action and no state transition should occur for that event.  Any
   significant comments concerning the transitions within a given state are
   given immediately following the table representing the state.

   A separate state machine is maintained by the Data Link Switch for each
   end-to-end circuit.  The number of circuits that may be supported by
   each Data Link Switch is a local implementation option.

   The CANUREACH_ex, ICANREACH_ex, NETBIOS_NQ_ex, and NETBIOS_NR_ex are SSP
   messages that are not associated with a particular circuit.  The
   processing of these messages is covered in section 5.4.

5.2.1. DISCONNECTED State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive CANUREACH_cs | DLC_START_DL        | RESOLVE_PENDING      |
   +----------------------+---------------------+----------------------+
   | Receive DATAFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | DLC_XID              | If source route     | If CANUREACH_cs was  |
   |                      | bridged frame with  | sent:                |
   |                      | broadcast indicated:|   CIRCUIT_START      |
   |                      |   Send CANUREACH_ex |                      |
   |                      | else:               |                      |
   |                      |   Send CANUREACH_cs |                      |
   |                      |   START_CS_TIMER    |                      |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM             | If NETBIOS          |                      |
   |                      | NAME_QUERY:         |                      |
   |                      |  Send NETBIOS_NQ_ex |                      |
   |                      | else:               |                      |
   |                      |  Send DATAFRAME     |                      |
   +----------------------+---------------------+----------------------+
   | DLC_CONTACTED        | Send CANUREACH_cs   | CIRCUIT_START        |
   +----------------------+---------------------+----------------------+

   It is assumed that each Data Link Switch will build a set of topology
   tables giving the identity of each Data Link Switch that can reach a
   specific MAC address or a specific NetBIOS name.  This table can be
   built based upon the origin address information received within the
   CANUREACH messages or NETBIOS_NQ messages and the target address
   information within the ICANREACH messages or NETBIOS_NR messages.  As a
   consequence, the amount of search traffic can be kept to a minimum.

   Upon receipt of a Test command or XID command to the null SAP (i.e.,
   DLC_RESOLVE_C signal from DLC), the Data Link Switch will check the
   topology table prior to sending the CANUREACH_cs message.  If the target
   MAC address is in the table, the CANUREACH_cs message will be sent to
   only those Data Link Switches that are known to be able to reach the
   given MAC address.  If the MAC address is not in the table, the
   CANUREACH_cs message will be sent to all known Data Link Switches.

AIW DLSw Related Interest Group                              [Page 31]

RFC XXXX      DLSw: Switch-to-Switch Protocol              August 1994

   Upon receipt of a NB_Name_Query the Data Link Switch will check the
   topology table prior to sending the NETBIOS_NQ_cs message.  If the
   target NetBIOS name is in the table, the NETBIOS_NQ_cs message will be
   sent to only those Data Link Switches that are known to be able to reach
   the given NetBIOS name.  If the NetBIOS name is not in the table, the
   NETBIOS_NQ_cs message will be sent to all known Data Link Switches.

   For SNA, the DISCONNECTED state is exited upon receipt of a CANUREACH
   message by a prospective target Data Link Switch.  In the former case,
   the Data Link Switch will issue a Test command to the target station
   (i.e., DLC_START_DL signal is presented to DLC).

     Note 1-  Some implementations will also send a Test command to the
     station that originated the resolve procedure (i.e., a DLC_START_DL
     will be issued) in order to start the data link.

5.2.2. RESOLVE_PENDING State

   +----------------------+-----------------------+-----------------------+
   |        Event         |      Action(s)        |      Next State       |
   +----------------------+-----------------------+-----------------------+
   | Receive DATAFRAME    | DLC_DGRM              |                       |
   +----------------------+-----------------------+-----------------------+
   | DLC_DL_STARTED       | If LF value of        | If LF value of        |
   |                      | DLC_DL_STARTED        | DLC_DL_STARTED        |
   |                      | is greater than or    | is greater than or    |
   |                      | equal to LF Size of   | equal to LF Size of   |
   |                      | CANUREACH_cs or LF    | CANUREACH_cs or LF    |
   |                      | Size Control bit set: | Size Control bit set: |
   |                      |   Send ICANREACH      |   CIRCUIT_PENDING     |
   |                      | else:                 | else:                 |
   |                      |   Send DLC_HALT_DL    |   HALT_PENDING_NOACK  |
   +----------------------+-----------------------+-----------------------+
   | DLC_ERROR            |                       | DISCONNECTED          |
   +----------------------+-----------------------+-----------------------+
   | DLC_DGRM             | Send DATAFRAME        |                       |
   +----------------------+-----------------------+-----------------------+

   The RESOLVE_PENDING state is entered upon receipt of a CANUREACH_cs
   message by the target DLSw.  A data link is started, causing a Test
   command to be sent by the DLC.

   Any CANUREACH_cs messages received in the RESOLVE_PENDING state will be
   responded to if a DLC_DL_STARTED signal is received.  The Data Link
   Switch may also update its topology information based upon the origin
   MAC address information in each CANUREACH_cs message.

   Upon the receipt of a DLC_DL_STARTED signal in the RESOLVE_PENDING
   state, the Data Link Switch may update its topology table base upon the
   remote MAC address information.  Upon the receipt of a DLC_DL_STARTED
   signal in the RESOLVE_PENDING state, the Data Link Switch may update its
   topology table base upon the remote MAC address information.  The
   ICANREACH_cs message must be returned to the first partner DLSw from

AIW DLSw Related Interest Group                              [Page 32]

RFC XXXX      DLSw: Switch-to-Switch Protocol              August 1994

   which a CANUREACH_cs was received for this circuit, or an implementation
   may optionally reply to all partners from which the CANUREACH_cs was
   received.

   The RESOLVE_PENDING state is exited once the data link has been started
   (i.e., a DLC_DL_STARTED signal is received as a result of a Test
   response received by the DLC).  The target Data Link Switch will then
   enter the CIRCUIT_PENDING state.

5.2.3. CIRCUIT_START State

   +----------------------+---------------------+-------------------------+
   |        Event         |      Action(s)      |      Next State         |
   +----------------------+---------------------+-------------------------+
   | Receive CANUREACH_cs | If origin MAC addr  | If DLC_START_DL         |
   | for circuit in       | in CANUREACH_cs is  | issued:                 |
   | opposite direction   | greater than origin |   RESOLVE_PENDING       |
   |                      | MAC addr of circuit:|                         |
   |                      |   DLC_START_DL      |                         |
   |                      | else:               |                         |
   |                      |   no action taken   |                         |
   +----------------------+---------------------+-------------------------+
   | Receive ICANREACH_cs | If LF Size Control  | If LF Size Control      |
   |                      | bit set and LF Size | bit set and LF Size     |
   |                      | is not negotiable:  | is not negotiable:      |
   |                      |   Send HALT_DL_NOACK|   DISCONNECTED          |
   |                      | else:               | else:                   |
   |                      |   Send REACH_ACK,   |   If Connected:         |
   |                      |   Send appropriate  |     CONNECT_PENDING     |
   |                      |   SSP message based |   else:                 |
   |                      |   on the event      |     CIRCUIT_ESTABLISHED |
   |                      |   that generated    |                         |
   |                      |   CANUREACH_cs      |                         |
   |                      |   (see Note)        |                         |
   +----------------------+---------------------+-------------------------+
   | DLC_DGRM             | Send DATAFRAME      |                         |
   +----------------------+---------------------+-------------------------+
   | DLC_ERROR            |                     | DISCONNECTED            |
   +----------------------+---------------------+-------------------------+
   | CS_TIMER_EXP         |                     | DISCONNECTED            |
   +----------------------+---------------------+-------------------------+
   | XPORT_FAILURE        |                     | DISCONNECTED            |
   +----------------------+---------------------+-------------------------+

   The CIRCUIT_START state is entered by the origin Data_Link_Switch when a
   DLC_XID or DLC_CONTACTED signal has been received from the DLC.  The
   origin Data Link Switch will check its topology table prior to sending
   the CANUREACH_cs message.  If the target MAC address is in the table,
   the CANUREACH_cs message will be sent to only those Data Link Link
   Switches that are known to be able to reach the given MAC address.  If
   the MAC address is not in the table, the CANUREACH_cs message will be
   sent to all known Data Link Switches.

AIW DLSw Related Interest Group                              [Page 33]

RFC XXXX      DLSw: Switch-to-Switch Protocol              August 1994

   The CIRCUIT_START state is exited upon receipt of an ICANREACH_cs
   message.  A REACH_ACK message will be returned to the target Data Link
   Switch.  If the CIRCUIT_START state was entered due to a DLC_XID signal,
   an XIDFRAME message containing the XID will be sent to to the target
   Data Link Switch.  If the CIRCUIT_START state was entered due to a
   DLC_CONTACTED signal, a CONTACT message will be sent to the target Data
   Link Switch.

   Note:  For example, DLC_XID - send XIDFRAME, DLC_CONTACTED - send
   CONTACT message

5.2.4. CIRCUIT_PENDING State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive CONTACT      | DLC_CONTACT         | CONTACT_PENDING      |
   +----------------------+---------------------+----------------------+
   | Receive HALT_DL      | DLC_HALT_DL         | HALT_PENDING         |
   +----------------------+---------------------+----------------------+
   | Receive HALT_DL_NOACK| DLC_HALT_DL         | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+
   | Receive REACH_ACK    | If Connected:       | If Connected:        |
   |                      |  Send CONTACT       |  CONNECT_PENDING,    |
   |                      |                     | else:                |
   |                      |                     |  CIRCUIT_ESTABLISHED |
   +----------------------+---------------------+----------------------+
   | Receive XIDFRAME     | DLC_XID             |                      |
   +----------------------+---------------------+----------------------+
   | Receive DGRMFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | Receive DATAFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | DLC_CONTACTED        | If UA is sent in    |                      |
   |                      | response to SABME:  |                      |
   |                      |   DLC_ENTER_BUSY    |                      |
   |                      | else:               |                      |
   |                      |   no action taken   |                      |
   +----------------------+---------------------+----------------------+
   | DLC_ERROR            | Send HALT_DL        | DISCONNECT_PENDING   |
   +----------------------+---------------------+----------------------+
   | DLC_XID              | Send XIDFRAME       |                      |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM             | Send DATAFRAME      |                      |
   +----------------------+---------------------+----------------------+
   | XPORT_FAILURE        | DLC_HALT_DL         | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+

AIW DLSw Related Interest Group                              [Page 34]

RFC XXXX      DLSw: Switch-to-Switch Protocol              August 1994

   The CIRCUIT_PENDING state is entered by the target Data Link Switch
   following the sending of an ICANREACH_cs message.  In this state it is
   awaiting the reception of a REACH_ACK message from the origin Data Link
   Switch.  If a connection does not exist with the target station (i.e.,
   the normal case), the Data Link Switch will enter the
   CIRCUIT_ESTABLISHED state.

   If the target Data Link Switch happens to receive a SABME command from
   the target station while in the CIRCUIT_PENDING state (i.e., a
   DLC_CONTACTED signal received from the DLC), the reception of the
   REACH_ACK message will cause the Data Link Switch to enter the
   CONNECT_PENDING state and to send a CONTACT message to the other Data
   Link Switch.

5.2.5. CONNECT_PENDING State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive CONTACTED    | If UA was sent in   | CONNECTED            |
   |                      | response to SABME:  |                      |
   |                      |   DLC_EXIT_BUSY     |                      |
   |                      | else:               |                      |
   |                      |   DLC_CONTACT       |                      |
   +----------------------+---------------------+----------------------+
   | Receive HALT_DL      | DLC_HALT_DL         | HALT_PENDING         |
   +----------------------+---------------------+----------------------+
   | Receive HALT_DL_NOACK| DLC_HALT_DL         | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+
   | Receive DGRMFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | Receive DATAFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | Receive ICANREACH_cs | Send HALT_DL_NOACK  |                      |
   +----------------------+---------------------+----------------------+
   | DLC_RESET            | Send RESTART_DL     | CIRCUIT_RESTART      |
   +----------------------+---------------------+----------------------+
   | DLC_ERROR            | Send HALT_DL        | DISCONNECT_PENDING   |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM             | Send DGRMFRAME      |                      |
   +----------------------+---------------------+----------------------+
   | XPORT_FAILURE        | DLC_HALT_DL         | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+

   The CONNECT_PENDING state is entered by the origin Data Link Switch when
   a DLC_CONTACTED signal has been received from the DLC (i.e., a SABME
   command has been received).  A CONTACT message is then issued.  The
   state is exited upon the receipt of a CONTACTED message from the target
   Data Link Switch.  If a DLC_RESET signal is received, the local data
   link is restarted and a RESTART_DL message is sent to the remote DLSw.

   An ICANREACH_cs received after the transition to CONNECT_PENDING state
   indicates that more than one CANUREACH_cs was sent at circuit
   establishment time and the target station was found by more than one

AIW DLSw Related Interest Group                              [Page 35]

RFC XXXX      DLSw: Switch-to-Switch Protocol              August 1994

   Data Link Switch partner.  A HALT_DL_NOACK is sent to halt the data link
   started by the Data Link Switch partner that originated this
   ICANREACH_cs.

     Note:  Some implementations will also send a Test command in order to
     restart the data link to the station that sent the SABME command
     (i.e., a DLC_START_DL will be issued).

5.2.6. CIRCUIT_ESTABLISHED State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive CONTACT      | DLC_CONTACT         | CONTACT_PENDING      |
   +----------------------+---------------------+----------------------+
   | Receive HALT_DL      | DLC_HALT_DL         | HALT_PENDING         |
   +----------------------+---------------------+----------------------+
   | Receive HALT_DL_NOACK| DLC_HALT_DL         | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+
   | Receive XIDFRAME     | DLC_XID             |                      |
   +----------------------+---------------------+----------------------+
   | Receive DGRMFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | Receive DATAFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | Receive ICANREACH_cs | Send HALT_DL_NOACK  |                      |
   +----------------------+---------------------+----------------------+
   | DLC_CONTACTED        | Send CONTACT        | CONNECT_PENDING      |
   |                      | If UA is sent in    |                      |
   |                      | response to SABME:  |                      |
   |                      |   DLC_ENTER_BUSY    |                      |
   |                      | else:               |                      |
   |                      |   no action taken   |                      |
   +----------------------+---------------------+----------------------+
   | DLC_ERROR            | Send HALT_DL        | DISCONNECT_PENDING   |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM             | Send DGRMFRAME      |                      |
   +----------------------+---------------------+----------------------+
   | DLC_XID              | Send XIDFRAME       |                      |
   +----------------------+---------------------+----------------------+
   | XPORT_FAILURE        | DLC_HALT_DL         | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+

   The CIRCUIT_ESTABLISHED state is entered by the origin Data Link Switch
   from the DISCONNECTED state, and by the target Data Link Switch from the
   CIRCUIT_PENDING state.  The state is exited when a connection is started
   (i.e., DLC receives a SABME command).  The next state is CONTACT_PENDING
   for the target Data Link Switch and CONNECT_PENDING for the origin Data
   Link Switch.

   An ICANREACH_cs received after the transition to CONNECTED state
   indicates that more than one CANUREACH_cs was sent at circuit
   establishment time and the target station was found by more than one
   Data Link Switch partner.  A HALT_DL_NOACK is sent to halt the data link

AIW DLSw Related Interest Group                              [Page 36]

RFC XXXX      DLSw: Switch-to-Switch Protocol              August 1994

   started by the Data Link Switch partner that originated this
   ICANREACH_cs.

5.2.7. CONTACT_PENDING State

      +----------------------+---------------------+----------------------+
      |        Event         |      Action(s)      |      Next State      |
      +----------------------+---------------------+----------------------+
      | Receive HALT_DL      | DLC_HALT_DL         | HALT_PENDING         |
      +----------------------+---------------------+----------------------+
      | Receive HALT_DL_NOACK| DLC_HALT_DL         | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+
      | Receive RESTART_DL   | DLC_HALT_DL         | RESTART_PENDING      |
      +----------------------+---------------------+----------------------+
      | Receive DGRMFRAME    | DLC_DGRM            |                      |
      +----------------------+---------------------+----------------------+
      | Receive DATAFRAME    | DLC_DGRM            |                      |
      +----------------------+---------------------+----------------------+
      | DLC_CONTACTED        | Send CONTACTED      | CONNECTED            |
      +----------------------+---------------------+----------------------+
      | DLC_ERROR            | Send HALT_DL        | DISCONNECT_PENDING   |
      +----------------------+---------------------+----------------------+
      | DLC_DGRM             | Send DGRMFRAME      |                      |
      +----------------------+---------------------+----------------------+
      | XPORT_FAILURE        | DLC_HALT_DL         | HALT_PENDING_NOACK   |
      +----------------------+---------------------+----------------------+

   The CONTACT_PENDING state is entered by the target Data Link Switch upon
   the receipt of a CONTACT message.  This causes the Data Link Switch to
   issue a DLC_CONTACT signal to the DLC (i.e., DLC sends a SABME command).
   This state is then exited upon the receipt of a DLC_CONTACTED signal
   from the DLC (i.e., a UA response received).

   If a RESTART_DL message is received, indicating that the remote Data
   Link Switch has received a DLC_RESET signal, the local Data Link Switch
   will send a DISC command frame on the adjacent LAN (i.e., DLC_HALT_DL
   signal) and enter the RESTART_PENDING state.

AIW DLSw Related Interest Group                              [Page 37]

RFC XXXX      DLSw: Switch-to-Switch Protocol              August 1994

5.2.8. CONNECTED State

   +----------------------+---------------------+----------------------+
   |        Event         |      Action(s)      |      Next State      |
   +----------------------+---------------------+----------------------+
   | Receive HALT_DL      | DLC_HALT_DL         | HALT_PENDING         |
   +----------------------+---------------------+----------------------+
   | Receive HALT_DL_NOACK| DLC_HALT_DL         | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+
   | Receive RESTART_DL   | DLC_HALT_DL         | RESTART_PENDING      |
   +----------------------+---------------------+----------------------+
   | Receive DGRMFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | Receive INFOFRAME    | DLC_INFO            |                      |
   +----------------------+---------------------+----------------------+
   | Receive DATAFRAME    | DLC_DGRM            |                      |
   +----------------------+---------------------+----------------------+
   | Receive XIDFRAME     | If non-activation   |                      |
   |                      | XID3:               |                      |
   |                      |   DLC_XID           |                      |
   +----------------------+---------------------+----------------------+
   | Receive ICANREACH_cs | Send HALT_DL_NOACK  |                      |
   +----------------------+---------------------+----------------------+
   | Receive ENTER_BUSY   | DLC_ENTER_BUSY      |                      |
   +----------------------+---------------------+----------------------+
   | Receive EXIT_BUSY    | DLC_EXIT_BUSY       |                      |
   +----------------------+---------------------+----------------------+
   | Rec TEST_CIRCUIT_REQ | Snd TEST_CIRCUIT_RSP|                      |
   +----------------------+---------------------+----------------------+
   | DLC_RESET            | Send RESTART_DL     | CIRCUIT_RESTART      |
   +----------------------+---------------------+----------------------+
   | DLC_ERROR            | Send HALT_DL        | DISCONNECT_PENDING   |
   +----------------------+---------------------+----------------------+
   | DLC_DGRM             | Send DGRMFRAME      |                      |
   +----------------------+---------------------+----------------------+
   | DLC_INFO             | Send INFOFRAME      |                      |
   +----------------------+---------------------+----------------------+
   | DLC_XID              | If non-activation   |                      |
   |                      | XID3:               |                      |
   |                      |   Send XIDFRAME     |                      |
   +----------------------+---------------------+----------------------+
   | XPORT_FAILURE        | DLC_HALT_DL         | HALT_PENDING_NOACK   |
   +----------------------+---------------------+----------------------+

   The CONNECTED state is entered by the origin Data Link Switch from the
   CONNECT_PENDING state upon the receipt of a CONTACTED message.  The
   CONNECTED state is entered by the target Data Link Switch from the
   CONTACT_PENDING state upon the receipt of a DLC_CONTACTED signal.  At
   this time, the target Data Link Switch will return a CONTACTED message
   to the origin Data Link Switch.

   The CONNECTED state is exited usually under one of two conditions: a
   DLC_ERROR signal received from the DLC (e.g., a DISC command received by

AIW DLSw Related Interest Group                              [Page 38]